package com.shopmall.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
   //Pojo实体类
   private int user_id;
   private String username;
   private String password;
   private int state; //1：正常 2：冻结 3：删除
   private String realname;
   private String phone;
   private String email;
   private String address;
   private String head_pic;  //头像图片保存路径url
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
   private Date add_date;
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
   private Date update_date;

   public int getUser_id() {
      return user_id;
   }

   public void setUser_id(int user_id) {
      this.user_id = user_id;
   }

   public String getUsername() {
      return username;
   }

   public void setUsername(String username) {
      this.username = username;
   }

   public String getPassword() {
      return password;
   }

   public void setPassword(String password) {
      this.password = password;
   }

   public int getState() {
      return state;
   }

   public void setState(int state) {
      this.state = state;
   }

   public String getRealname() {
      return realname;
   }

   public void setRealname(String realname) {
      this.realname = realname;
   }

   public String getPhone() {
      return phone;
   }

   public void setPhone(String phone) {
      this.phone = phone;
   }

   public String getEmail() {
      return email;
   }

   public void setEmail(String email) {
      this.email = email;
   }

   public String getAddress() {
      return address;
   }

   public void setAddress(String address) {
      this.address = address;
   }

   public String getHead_pic() {
      return head_pic;
   }

   public void setHead_pic(String head_pic) {
      this.head_pic = head_pic;
   }

   public Date getAdd_date() {
      return add_date;
   }

   public void setAdd_date(Date add_date) {
      this.add_date = add_date;
   }

   public Date getUpdate_date() {
      return update_date;
   }

   public void setUpdate_date(Date update_date) {
      this.update_date = update_date;
   }
}
